
package StackAlgorithm;

/**
 *
 * @author hazem
 */
public class Node
{
	private Object element;
	private Node next;

	public Node(Object obj, Node n)
	{
		element = obj;
		next = n;
	}

	public Node()
	{
		this(null,null);
	}
	public Object getElement()
	{
		return element;
	}

	public Node getNext()
	{
		return next;
	}

	public void setElement(Object newElem)
	{
		element = newElem;

	}

	public void setNext(Node newNext)
	{
		next = newNext;

	}

}

